home *** CD-ROM | disk | FTP | other *** search
/ Champak 109 / Vol 109.iso / games / free_sty.swf / scripts / DefineSprite_13_tt / frame_1 / DoAction.as
Text File  |  2008-11-12  |  2KB  |  61 lines

  1. if(_root.debug == 1)
  2. {
  3.    this.onPress = function()
  4.    {
  5.       if(_root.setb == "del")
  6.       {
  7.          var _loc3_ = 0;
  8.          while(_loc3_ < _root.ttn)
  9.          {
  10.             if(_root.bg_mc["tt" + _loc3_].ii > this.ii)
  11.             {
  12.                _root.bg_mc["tt" + _loc3_].ii--;
  13.             }
  14.             _loc3_ = _loc3_ + 1;
  15.          }
  16.          _root.zhu_array[_root.level].splice(this.ii,1);
  17.          _root.showA();
  18.          this.removeMovieClip();
  19.       }
  20.       else if(_root.setb == "bian")
  21.       {
  22.          this.startDrag(true);
  23.          this.xx = this._x;
  24.          this.yy = this._y;
  25.       }
  26.       else if(_root.setb == "set")
  27.       {
  28.          _root.debug_mc._visible = 1;
  29.          _root.debug_mc.shijian = "tong";
  30.          _root.debug_mc.ii = this.ii;
  31.          _root.debug_mc.dd1.text = this.ii;
  32.          _root.debug_mc.dd1.text += "--" + _root.zhu_array[_root.level][this.ii][2];
  33.          _root.debug_mc.dd2.text = _root.zhu_array[_root.level][this.ii][2];
  34.          _root.debug_mc.dd3.text = _root.zhu_array[_root.level][this.ii][3].toString(2);
  35.          _root.debug_mc.dd4.text = _root.zhu_array[_root.level][this.ii][4];
  36.          _root.debug_mc.dd5.text = _root.zhu_array[_root.level][this.ii][5];
  37.          _root.debug_mc.dd6.text = _root.zhu_array[_root.level][this.ii][6];
  38.          _root.setb = "";
  39.       }
  40.    };
  41.    this.onRelease = this.onReleaseOutside = function()
  42.    {
  43.       this.stopDrag();
  44.       if(_root.setb == "bian")
  45.       {
  46.          _root.zhu_array[_root.level][this.ii][0] = this._x;
  47.          _root.zhu_array[_root.level][this.ii][1] = this._y;
  48.          this.xx = this._x;
  49.          this.yy = this._y;
  50.          _root.showA();
  51.       }
  52.       else
  53.       {
  54.          this._x = this.xx;
  55.          this._y = this.yy;
  56.       }
  57.       _root.setb = "";
  58.    };
  59. }
  60. stop();
  61.